﻿# CMakeList.txt: 顶层 CMake 项目文件，在此处执行全局配置
# 并包含子项目。
#
cmake_minimum_required (VERSION 3.8)

project("testopencv")
SET(EXE_NAME "testopencv")
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PROJECT_BIN_PATH})

set(OpenCV_DIR "${VCPKG_INSTALLED_DIR}/x64-windows/share/opencv4")
find_package(OpenCV REQUIRED)

message("opencv:${OpenCV_DIR} include:${OpenCV_INCLUDE_DIRS}")

include_directories(
    "${CMAKE_CURRENT_SOURCE_DIR}/tools"
    "./src"
)

source_group("tools" FILES ${TOOLS_INC_LIST})
source_group("main" FILES main.cpp)


set(THIRD_INCLUDE_DIRS
${OpenCV_INCLUDE_DIRS}
)


set(THIRD_LIBRARY_DIRS 
)
#message("third lib dir:${THIRD_LIBRARY_DIRS}")

set(THIRD_LINK_LIBRARY
${OpenCV_LIBS}
)

#message("third link lib:${THIRD_LINK_LIBRARY}")


build_project(
	NAME 
		${EXE_NAME} 
	SRCS
		"main.cpp"
		${TOOLS_INC_LIST}
	INC_DIR
		${THIRD_INCLUDE_DIRS}
	LIB_DIR
		${THIRD_LIBRARY_DIRS}
	LINK_LIB
		${THIRD_LINK_LIBRARY}
)
